package com.xuecheng.framework.domain.course;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by admin on 2018/2/10.
 */
@Data
@ToString
@Entity
@Table(name="course_market")
@ApiModel(value = "课程收费情况表")
@GenericGenerator(name = "jpa-assigned", strategy = "assigned")
public class CourseMarket implements Serializable {

    @Id
    @GeneratedValue(generator = "jpa-assigned")
    @Column(length = 32)
    @ApiModelProperty(name = "id",value = "课程id")
    private String id;
    @ApiModelProperty(name = "charge",value = "收费规则,对应数据字典")
    private String charge;
    @ApiModelProperty(name = "valid",value = "有效性,对应数据字典")
    private String valid;
    @ApiModelProperty(name = "qq",value = "咨询qq")
    private String qq;
    @ApiModelProperty(name = "price",value = "价格")
    private Double price;
    @ApiModelProperty(name = "price_old",value = "原价")
    private Double price_old;

//    private Date expires;
    @Column(name = "start_time")
    @ApiModelProperty(name = "startTime",value = "课程有效期-开始时间")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date startTime;
    @Column(name = "end_time")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(name = "endTime",value = "课程有效期-结束时间")
    private Date endTime;

}
